﻿using Luna小店.Utils;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Luna小店.DTO
{
    public class DTO样衣订单导出
    {
        public String ORDER_ID { get; set; } // 订单ID
        public String ORDER_NO { get; set; } // 订单号
        public String ORDER_NUMBER { get; set; } // 订单数量
        public String ORDER_DATE { get; set; } // 订单日期
        public String CUSTOM_NAME { get; set; } // 客户名称
        public String SHOP_NAME { get; set; } // 店名
        public String ORDER_SHIPMENTS_DATE { get; set; } // 船期
        public String STYLE_ID { get; set; } // 款号 
        public String STYLE_NAME_CN { get; set; } // 款式
        public String STYLE_MAKE_TYPE { get; set; } // 缝制方式
        public String Style_FIT_CD { get; set; } // 版型
        public String MATERIAL_CODE { get; set; } // 面料品号
        public String MATERIAL_SPEC { get; set; } // 幅宽
        public String MATERIAL_STITCH { get; set; } // 面料针码
        public String MATERIAL_STYLE { get; set; } // 物料风格        
        public String STYLE_SIZE_CD { get; set; }   //  尺码
        public String REMARKS { get; set; } //  备注
        public ImageUtil imageUtil { get; set; }
        public Image Picture { get; set; }
        public DTO样衣订单导出(DataRow dataRow订单, DataRow dataRow款式, DataRow dataRow面料, ImageUtil imageUtil)
        {
            this.imageUtil = imageUtil;
            this.Picture = this.imageUtil.image;
            this.ORDER_ID = dataRow订单["ORDER_ID"].ToString();
            this.ORDER_NO = dataRow订单["ORDER_NO"].ToString();
            this.ORDER_NUMBER = dataRow订单["ORDER_NUMBER"].ToString();
            this.ORDER_DATE = dataRow订单["ORDER_DATE"].ToString();
            this.CUSTOM_NAME = dataRow订单["CUSTOM_NAME"].ToString();
            this.SHOP_NAME = dataRow订单["SHOP_NAME"].ToString();
            this.ORDER_SHIPMENTS_DATE = dataRow订单["ORDER_SHIPMENTS_DATE"].ToString();
            this.STYLE_ID = dataRow订单["STYLE_ID"].ToString();
            this.REMARKS = dataRow订单["REMARKS"].ToString();

            this.STYLE_NAME_CN = dataRow款式["STYLE_NAME_CN"].ToString();
            this.STYLE_MAKE_TYPE = dataRow款式["STYLE_MAKE_TYPE"].ToString();
            this.Style_FIT_CD = dataRow款式["Style_FIT_CD"].ToString();
            this.MATERIAL_CODE = dataRow面料["MATERIAL_CODE"].ToString();
            this.MATERIAL_SPEC = dataRow面料["MATERIAL_SPEC"].ToString();
            this.MATERIAL_STITCH = dataRow面料["MATERIAL_STITCH"].ToString();
            this.MATERIAL_STYLE = dataRow面料["MATERIAL_STYLE"].ToString();


            this.STYLE_SIZE_CD =
                dataRow款式["STYLE_SIZE_GROUP_CD"].ToString()
                + "/"
                + dataRow款式["STYLE_SIZE_CD"].ToString().Replace("IGS_GROUP_SIZE-", "").Replace("EGS_GROUP_SIZE-", "");

        }
    }
}
